# -*- coding: utf-8 -*-

#!/usr/bin/python

import sys

from PyQt4 import QtCore, QtGui
from ui.Ui_dialog import Ui_Dialog

class Main(QtGui.QDialog):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_Dialog()
        self.ui.setupUi(self)

        QtCore.QObject.connect(self.ui.Btn1, QtCore.SIGNAL("clicked()"), self.on_btn_clicked1);
        QtCore.QObject.connect(self.ui.Btn2, QtCore.SIGNAL("clicked()"), self.on_btn_clicked2);
        QtCore.QObject.connect(self.ui.Btn3, QtCore.SIGNAL("clicked()"), self.on_btn_clicked3);

    def on_btn_clicked1(self):
        self.ui.label.setText(u"按钮1")
    def on_btn_clicked2(self):
        self.ui.label.setText(u"按钮2")
    def on_btn_clicked3(self):
        self.ui.label.setText(u"按钮3")

if __name__ == '__main__':
    app = QtGui.QApplication(sys.argv)
    myapp = Main()
    myapp.show()
    sys.exit(app.exec_())
